package main

import (
	"token-centre/controller"
	"token-centre/middleware"

	"github.com/gin-gonic/gin"
)

func router(r *gin.Engine) {
	// 简单的路由组: v1
	api := r.Group("/api")
	{
		api.Use(middleware.Login)

		user := api.Group("/app")
		{
			user.Any("/add", controller.AppAdd)
			user.Any("/list", controller.AppList)
			user.Any("/delete", controller.AppDelete)
		}

		api.Any("/tokenGet", controller.TokenGet)
	}
}
